<?php
    class donvitinhbs
    {
        public $MaDonViTinh = 0;
		public $TenDonViTinh = '';
		
		public function getList($order = '', $start = 0, $num = 30, $all = 0)
		{
			$db = new donvitinhdb();
			return $db->getList($this->MaDonViTinh, $this->TenDonViTinh, $order, $start, $num, $all);
		}
        
        public function add()
		{
			$db = new donvitinhdb();
			return $db->add($this->TenDonViTinh);
		}
		
		public function update()
		{
			$db = new donvitinhdb();
			return $db->update($this->MaDonViTinh,$this->TenDonViTinh);
		}
		
		public function delete()
		{
			$db = new donvitinhdb();
			return $db->delete($this->MaDonViTinh);
		}
        
        public function issetTypes()
		{
			$db = new donvitinhdb();
			return $db->issetTypes($this->MaDonViTinh, $this->TenDonViTinh);
		}
        
        public function issetType()
		{
			$db = new donvitinhdb();
			return $db->issetType($this->TenDonViTinh);
		}
    }
?>